<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://www.tag.com/website" prefix="s"%>

<div id="wrap-menu" class="mt-10">
	<div class="menu inner clearfix">
		<div class="nav-l">
        	<h2 class="nav-l-hd"><span><img src="${webctx}/images/classify.png" alt=""></span>全部分类</h2>
        	<%if(!"false".equals(request.getParameter("loadclsnav"))){//未解决360下的首页特殊处理 %>
        	<div class="nav-l-bd hide" id="clsnavmenu">
            	
            </div>
            <%} %>
        </div>
		<ul class="nav-r" id="topmenu">
			<li><a id="tophome" href="${pageContext.request.contextPath}/website/index.jsp">首页</a><span></span></li>
			<li><a id="navActivityArea" href="${pageContext.request.contextPath}/product/activityArea">促销活动</a><span></span></li>
			<s:channel code="001">
				<li><a id="top${code }" href="${pageContext.request.contextPath}/product/subject?channelcode=${code }">${name }</a> <span></span></li>
			</s:channel>
			<li><a id="topproducts" href="${pageContext.request.contextPath}/product/list">全部商品</a></li>
		</ul>
	</div>
</div>
<script>
var showclsnav="<%=request.getParameter("showclsnav") %>";
function loadclsnav(){
	$w.loadPanel(apiroot+"/index/loadClsNav",{},"clsnavmenu");
}
$(".nav-l").hover(function () {
        showhideclsnav();
});

function showhideclsnav(){
    if($("#clsnavmenu").css("display")!="none"){if(showclsnav!='true')$("#clsnavmenu").hide();}
    else{$("#clsnavmenu").html($("#clsnavmenu").html());$("#clsnavmenu").show();}
}
loadclsnav();

$(function(){
	$w.upLoginCookieTime();
	var url=window.location.href;
	var ishome=true;
	if(url.indexOf("product/subject")!=-1){
		var clscode=getQueryString("channelcode");
		$("#top"+clscode).addClass("cur");
		ishome=false;
	}else if(url.indexOf("product/list")!=-1){
		$("#topproducts").addClass("cur");
		ishome=false;
	} else if(url.indexOf('product/activityArea')!=-1){
		$("#navActivityArea").addClass("cur");
		ishome=false;
	}else if(url.indexOf("website")!=-1){
		$("#tophome").addClass("cur");
	}
	if(showclsnav=='true')$("#clsnavmenu").show();
})
</script>